package servlet;

import dom.redom;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/reServlet")
public class reServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        redom re = new redom();
        re.setUserid(request.getParameter("id"));
        re.setName(request.getParameter("xm"));
        re.setPassword(request.getParameter("mm"));
        re.setNumber(request.getParameter("nu"));
        re.registered(re.getUserid(), re.getName(), re.getPassword(), re.getNumber());
        response.sendRedirect("index.jsp");
    }
}


